#include<stdio.h>

void printfOctNum(int a[],int n)
{
	int i;
	for(i=n-1;i>=0;i--)
	{
		printf("%d",a[i]);
	}
	//printf("\n");
}
void printfHeXNum(int a[],char b[],int n)
{
	int i;
	int temp;
	for(i=n-1;i>=0;i--)
	{
		temp=a[i];
		printf("%c",b[temp]);
	}
	//printf("\n");
}
//八进制
void Oct(int num)
{
	int i=0;
	int a[64];//存放%8的数
	do{
		a[i]=num%8;
		num=num/8;
		i++;
	}while(num);
	printfOctNum(a,i);
}
//十六进制
int Hex(int num)
{
	char ch[17]={"0123456789ABCDEF"};//最后有一个'\0'
	int i=0;
	int a[64];
	do{
		a[i]=num%16;
		num=num/16;
		i++;
	}while(num);
	printfHeXNum(a,ch,i);
}

int main()
{
	int num1;
	scanf("%d",&num1);
	Oct(num1);
	printf(",");
	Hex(num1);
	printf(",");
	printf("%d\n",num1);
	printf("下面是答案：\n");
	printf("=============================\n");
	printf("%d,%d,%d\n",0123,0X123,123);//以整型的形式输出 123的十六进制 3*(1<<0)+2*(1<<4)+1*(1<<4)*(1<<4)=291 
//	                                                                     3*16^0+2*16*1+1*16^2=291
	printf("%f,%f\n",123.4,1.234e2);//以浮点数的形式输出
	return 0;
}
